from datetime import datetime
from sqlalchemy import Column, DateTime, String, Integer, Boolean

from src.db import TableBase
from src.enums.task import TaskStatusEnum


class ScheduleTask(TableBase):
    __tablename__ = "schedule_task"

    task_uuid = Column(String(32),primary_key=True)
    task_params = Column(String(500),default=None)
    task_status = Column(Integer, index=True, default=TaskStatusEnum.INIT.value)
    reason = Column(String(500),default=None)
    exec_time = Column(DateTime, default=None)
    data_file_path = Column(String(500),default=None)
    create_time = Column(DateTime,default=datetime.now())
